import urllib.request as ur
#可以封装header 亦可以封装data
request = ur.Request('https://blog.csdn.net/')
response = ur.urlopen(request).read()
print(response)
with open('edu.html','wb') as f:
    f.write(response)